package yf.mall.enums;

import lombok.Getter;

import java.util.Arrays;


/**
 * 
 * 
 * @date Tue Sep 29 10:16:21 CST 2020
 */
@Getter
public enum CashApplyStatusEnum {


    AUDIT(0, "待审核"),


    PASS(1, "通过"),


    REFUSE(2, "拒绝");


    int index;
    String value;

    public static String[] names() {
        return Arrays.stream(CashApplyStatusEnum.values()).map(m -> m.getValue()).toArray(String[]::new);
    }

    CashApplyStatusEnum(int index, String value) {
        this.index = index;
        this.value = value;
    }

    public static String indexOf(int idx) {
        return CashApplyStatusEnum.values()[idx].getValue();
    }

}
